import 'package:flutter_ohos/generated/json/base/json_field.dart';
import 'package:flutter_ohos/generated/json/person_entity.g.dart';
import 'dart:convert';
export 'package:flutter_ohos/generated/json/person_entity.g.dart';

@JsonSerializable()
class PersonEntity {
	String? name = '';
	int? age = 0;

	PersonEntity();

	factory PersonEntity.fromJson(Map<String, dynamic> json) => $PersonEntityFromJson(json);

	Map<String, dynamic> toJson() => $PersonEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}